package com.hqyj.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hqyj.pojo.Expenditure;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 * 支出表 Mapper 接口
 * </p>
 *
 * @author rock
 * @since 2021-10-21
 */
@Mapper
public interface ExpenditureMapper extends BaseMapper<Expenditure> {
    @Select("SELECT * from expenditure")
    @Results(id="ddd",value = {
            @Result(column = "expenditure_id",property = "expenditureId"),
            @Result(column = "expenditure_money",property = "expenditureMoney"),
            @Result(column = "expenditure_time",property = "expenditureTime"),
            @Result(column = "beizhu",property="beizhu"),
            @Result(column = "sys_id",property="user",
                    one = @One(select = "com.hqyj.dao.UserMapper.selectById")
            ),

    })
    Page<Expenditure> query(Page<Expenditure> page);
}
